package nirvana.core.validation.annotions;


import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import nirvana.core.validation.constraint.EnumNotEmptyValidator;

import java.lang.annotation.*;

/**
 *
 * @author linkanyway
 */
@Documented
@Target ({ElementType.METHOD,ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint (validatedBy = EnumNotEmptyValidator.class)
public @interface EnumNotEmpty {
    String message() default "Enum can't be empty";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
